#include <stdafx.h>

CCriticalSection::CCriticalSection()
{
#ifdef WIN32
	InitializeCriticalSection(&m_cs);
#endif
}

CCriticalSection::~CCriticalSection()
{
#ifdef WIN32
	DeleteCriticalSection(&m_cs);
#endif
}

void CCriticalSection::enter()
{
#ifdef WIN32
	EnterCriticalSection(&m_cs);
#endif
}

void CCriticalSection::leave()
{
#ifdef WIN32
	LeaveCriticalSection(&m_cs);
#endif
}